<ol class="breadcrumb">
  <li><a href="<?php echo base_url('welcome') ?>">Trang chủ</a></li>
  <li class="active">Tin tức</li>
</ol>
<fieldset>
    <legend><?php echo $info ?></legend>
    <?php
        for($i = 0 ; $i < count($content); $i++)
        {
            $madanhmuc  = $content[$i]['madanhmuc'];
            $madanhmuc_cha  = $content[$i]['madanhmuc_cha'];
            $id = $content[$i]['id'];
            $tieude = $content[$i]['tieude'];
            $imageLink = $content[$i]['imagelink'];
            $noidungbaiviet = $content[$i]['noidungbaiviet_viet'];
            echo "<div class='row'>";
            echo "<div class='col-md-12'>";
            echo "<h6><b><a href='". base_url('tintuc/view?tieude=' . $tieude . '&madanhmuc=' . $madanhmuc . '&id=' . $id . '&madanhmuc_cha=' . $madanhmuc_cha) ."'>$tieude</a></b></h6>";
            echo "</div>";
            echo "<div class='container-fluid'>";
            echo "<div class='row'>";
            echo "<div class='col-xs-6 col-md-2'><img class='img-rounded' width='120' height='80' src='$imageLink'/></div>  ";
            echo "<div class='col-xs-6 col-md-10'>$noidungbaiviet</div>";
            echo "</div></div></div>";
        }    
            
        if(isset($totalPage) && $totalPage > 1)
        {           
           echo "<div class='text-center'>";
           echo "<ul class='pagination'>";
           $prevNumber = $currentPage - 1;
           if($prevNumber == 0) $prevNumber = 1;
           $nextNumber = $currentPage + 1;
           if($nextNumber > $totalPage) $nextNumber = $totalPage;
           if($currentPage > 1)
                echo "<li><a href='". base_url('tintuc?page=' . $info . '&number=' . $prevNumber . '&madanhmuc=' . $madanhmuc . '&madanhmuc_cha=' . $madanhmuc_cha) ."'>&laquo;</a></li>";
            else
                echo "<li class='disabled'><span>&laquo;</span></li>";
           for($i = 1; $i <= $totalPage; $i++)
            {
                if($i == $currentPage)
                   echo "<li class='active'><a href='". base_url('tintuc?page=' . $info . '&number=' . $i . '&madanhmuc=' . $madanhmuc . '&madanhmuc_cha=' . $madanhmuc_cha) ."'>$i</a></li>" ;
                else
                   echo "<li><a href='". base_url('tintuc?page=' . $info . '&number=' . $i . '&madanhmuc=' . $madanhmuc . '&madanhmuc_cha=' . $madanhmuc_cha) ."'>$i</a></li>" ;
           }
           if($currentPage == $totalPage)           
                echo "<li class='disabled'><span>&raquo;</span></li>";
           else
                echo "<li><a href='". base_url('tintuc?page=' . $info . '&number=' . $nextNumber . '&madanhmuc=' . $madanhmuc . '&madanhmuc_cha=' . $madanhmuc_cha) ."'>&raquo;</a></li>";
           echo "</ul>";
           echo "</div>";
        }
    ?>
</fieldset>